import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

//Server
public class Test4 {
    public static void main(String[] args) throws IOException {
        //TCP Socket
        ServerSocket ss = new ServerSocket(8080);
        Socket s = ss.accept();
        BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
        int i = 0;
        while ((i = br.read())!= -1) {
            System.out.print((char) i);
        }
        s.close();
        ss.close();
    }
}
